<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>   
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String contextPath = request.getContextPath();
%> 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>정보수정</title>
<style type="text/css">
	#update_wrap{
		padding: 0;
		color: #696969;
		line-height: normal;
		font-style: normal;
		font-family: Verdana;
		font-size: 12px;
		margin-bottom: 100px;
	}
	#update_wrap p{
		margin: 9px 0 12px 0;
	}
	#title_img{
		margin-top: 100px;
		margin-left: -4px;
	}
	#title_txt{
		text-align: left;
	}
	#main_contents{
	}
	#info_table{
		border-spacing: 2px;
		border-color: gray;
		border-collapse: collapse;
		width:550px;
		text-align: left;
		border-top: 1px solid #383838;
		border-bottom: 1px solid #383838;
		background: #fff;
	}
	#info_table th{
		width:100px;
		text-align: left;
		background: #f5f5f5;
		padding: 10px 0 10px 10px;
		font-weight: bold;
		border-top: 1px solid #e0e0e0;
	}
	#info_table td{
		text-align: left;
		padding: 10px;
		border-top: 1px solid #e0e0e0;
	}
	#btn_center{
		width: 550px;
		text-align: center;
	}
	#input_basic{
		border: 1px solid #dcdcdc;
		height: 16px;
	}
	#input_basic:focus {
		background:#f7f3ed;
		border:1px solid #706047;
	}
	.update_btn{
		width:130px;
		height:30px;
		margin-right:10px;
		background-color: #0D836B;
		font-family: "맑은 고딕";
		font-size:9pt;
		color:white;
		border: 0;
		border-radius: 5px;
	}
	.my_btn{
		width:130px;
		height:30px;
		margin-right:10px;
		background-color: #2F4F4F;
		font-family: "맑은 고딕";
		font-size:9pt;
		color:white;
		border: 0;
	}
	select{
		font-size:12px;
		height: 18px;
	}
	select:focus{
		background:#f7f3ed;
		border:1px solid #706047;
	}
	#mypage_list_tab{
		width:600px;
		height: 47px;
	}
	#mypage_list_tab h2{
		float: left;
		margin-bottom: 10px;
	}
	#list ul{
		overflow: auto;
		padding: 0;
	}
	#list li{
		float:left;
		list-style:none;
	}
	#b{
		color:red;
	}
	.inputb{
		border-bottom: #999999 1px solid;
		border-left: #cecece 1px solid;
		border-right: #999999 1px solid;
		border-top: #cecece 1px solid;
		color: #000000;
		font-size: 9pt;
		font-family: nanum;
		background-color: #ededed;
		width:50px;
		height:20px;
	}
</style>
</head>
<body>
<div id="update_wrap">
	<div id="title_img">
		&nbsp;<img src="./images/member/title_mypage_3.png">&nbsp;
	</div>
	<p style="height: 10px"></p>
	<div id="list">
		<ul id="mypage_list_tab">
			<li>
				<form action="<%=contextPath %>/detail.do" method="post">
					<input type="hidden" name="email" value="${email}">
					<input type="submit" value="멤버십 정보" class="my_btn" style="cursor: pointer">
				</form>
			</li>
			<li>
				<form action="<%=contextPath %>/updateForm.do" method="post">
					<input type="hidden" name="email" value="${email}">
					<input type="submit" value="개인정보변경" class="my_btn" style="cursor: pointer">
				</form>
			</li>
			<li>
				<form action="<%=contextPath %>/serviceList.do" method="post">
					<input type="hidden" name="email" value="${email}">
					<input type="submit" value="문의 내역" class="my_btn" style="cursor: pointer">
				</form>
			</li>
			<li>
				<form action="<%=contextPath %>/delete.do" method="post">
					<input type="hidden" name="email" value="${email}">
					<input type="submit" value="회원 탈퇴" class="my_btn" style="cursor: pointer">
				</form>
			</li>
		</ul>
	</div>
	<p id="title_txt">
		<img src="./images/member/blit_dot.png">&nbsp;&nbsp;
			<span style="font-weight: bold; font-size: 12pt">${memberCommand.name}</span>
			고객님의 정보를 수정하실 수 있습니다.
	</p>
	<br>
	<form:form commandName="memberCommand" action="/haggenna/update.do">
		<input type="hidden" name="name" value="${memberCommand.name}">
		<input type="hidden" name="email" value="${email}">
		<div id="main_contents">
			<table id="info_table">
				<tbody>
					<tr>
						<th>이름</th>
						<td>${memberCommand.name}</td>
					</tr>
					<tr>
						<th>메일</th>
						<td style="cursor:default;">${email}</td>
					</tr>
					<tr>
						<th>비밀번호</th>
						<td><form:password path="passwd" id="input_basic"/><form:errors path="passwd" id="b"/><br><img src="./images/member/txt_help_pw.jpg"></td>
					</tr>
					<tr>
						<th>생년월일</th>
						<td><input type="text" name="birth" value="${memberCommand.birth}"
									style="border:0; background: transparent;" disabled="disabled" size="10px;"></td>
					</tr>
					<tr>
						<th>연락처</th>
						<td><form:input path="phone" id="input_basic"/><form:errors path="phone" id="b"/></td>
					</tr>
					<tr>
						<th>즐겨찾는 음료</th>
						<td colspan="3">
							<select name="favor">
								<c:forEach var="item" items="${itemList}">
									<option value="${item.item_name}">${item.item_name}</option>
								</c:forEach>
							</select>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
		<p style="height: 40px"></p>
		<p id="btn_center">
			<input type="submit" value="수정완료" class="update_btn" style="cursor: pointer">
		</p>
	</form:form>
</div>
</body>
</html>